/**
 * Created by zhanglihe on 15/11/7.
 */
require.config(require_config);

define([
    'jquery',
    'common',
    'ready',
    'collection',
    'template',
    'model',
    'dialog'
], function( $, common, ready, Collection, template, Model, dialog ) {

    //获取嵌入方id
    var partner_id = getUrlPath(3);

    var index = function() {
        this.init();
    };
    index.prototype = {
        init: function() {
            loading();
            this.fetch();
        },

        fetch: function() {
            var _this = this;
            this.collection = new Collection({
                url: _global.url.api + 'embed_order/' + partner_id,
                model: {

                },
                callback: function() {
                    loaded();//移除加载效果
                }
            });
            this.collection.fetch();
        }
    };
    new index();
});